package com.block.datapush.form.item.util;

import cn.hutool.core.util.StrUtil;
import com.block.common.enums.BaseTypeInfoEnum;

import java.util.Arrays;
import java.util.List;

public class DaJinDaiUtil {

    public static Integer getZhima(String zhima){
        if (StrUtil.equals(BaseTypeInfoEnum.ZhimaScore.zm001.getValue(), zhima)){
            return 0;
        }else if (StrUtil.equals(BaseTypeInfoEnum.ZhimaScore.zm002.getValue(), zhima)){
            return 599;
        }else if (StrUtil.equals(BaseTypeInfoEnum.ZhimaScore.zm003.getValue(), zhima)){
            return 649;
        }else if (StrUtil.equals(BaseTypeInfoEnum.ZhimaScore.zm004.getValue(), zhima)){
            return 699;
        }else if (StrUtil.equals(BaseTypeInfoEnum.ZhimaScore.zm005.getValue(), zhima)){
            return 750;
        }
        return 1;
    }

    public static List<String> cityList = Arrays.asList("北京市", "天津市","上海市","重庆市");
    public static String getCityName(String city, String province) {
        if (cityList.contains(province)){
            return province;
        }
        return city;
    }


    public static Integer getShebao(String socialInsurance) {
        if (StrUtil.equals(BaseTypeInfoEnum.SocialInsurance.si001.getValue(), socialInsurance)){
            return 0;
        }
        return 12;
    }

    public static Integer getGjj(String gjj) {
        if (StrUtil.equals(BaseTypeInfoEnum.Gjj.gjj001.getValue(), gjj)){
            return 0;
        }
        return 12;
    }

    public static Integer getCar(String car) {
        if (StrUtil.equals(BaseTypeInfoEnum.Car.car001.getValue(), car)){
            return 0;
        }
        return 2;
    }

    public static Integer getHouse(String house) {
        if (StrUtil.equals(BaseTypeInfoEnum.House.hu001.getValue(), house)){
            return 0;
        }
        return 2;
    }

    public static Integer getBaodan(String insurance) {
        if (StrUtil.equals(BaseTypeInfoEnum.Insurance.in001.getValue(), insurance)){
            return 0;
        }
        return 1;
    }
}
